<layout name="../../../resource/master" />
<section class="vbox">
    <section>
        <section class="hbox stretch">
            <!--.aside -->
            <section id="content">
                <section class="vbox">
                    <section class="scrollable padder">
                        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                            <li><a href="#"><i class="fa fa-home"></i> 首页</a></li>
                            <li><a href="">分类管理</a></li>
                            <li class="active">编辑分类</li>
                        </ul>
                        <section class="panel panel-default">
                            <header class="panel-heading font-bold">
                                编辑分类
                            </header>
                            <div class="panel-body">
                                <form class="form-horizontal" id="form" method="post" action="">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <div class="col-sm-5"></div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">分类名称</label>
                                        <div class="col-sm-5">
                                            <input type="text" name="cname" required class="form-control" placeholder="属性名称长度 1 到 20 位" value="{$oldData['cname']}">

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">所属分类</label>
                                        <div class="col-sm-3">


             <select name="pid"  required class="form-control">
                 <option value="0">等级分类</option>
                 <foreach name="field" item="vo" >
                <option value="{$vo['cid']}"  <if    condition="$vo['cid']==$oldData['pid']">selected</if> >{$vo['_cname']}</option>
                                                </foreach>
                                            </select>

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">所属类型</label>
                                        <div class="col-sm-2">

                                            <select name="tid"  required class="form-control">

                                                <foreach name="type" item="vo">
                                                <option value="{$vo['tid']}" <?php if($vo['tid']==$oldData['tid']){ ?>  selected='selected' <?php }?>>{$vo['tname']}</option>
                                                </foreach>
                                            </select>

                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" id="btn" type="submit">确定编辑</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </section>
                    </section>
                </section>
            </section>
        </section>
    </section>
</section>